(define (make-account password balance)
    (define (withdraw amount)
        (cond            
            ((< balance amount) "Insufficient funds")
            (else 
                (begin
                    (set! balance (- balance amount))
                    balance
                )
            )
        )
    )
    (define (deposit amount)
        (set! balance (+ balance amount))
        balance
    )
    (define (dispatch pwd m)
        (newline)
        (if (eq? pwd password)
            (cond 
                ((eq? m `withdraw) withdraw)
                ((eq? m `deposit) deposit)
                (else (error "...." m))
            )    
            (lambda (x) 
            "Incorrect password"
            )
        )
        
    )
    dispatch
)


(define acc (make-account  `secret-password 100))
(display ((acc `secret-password `withdraw) 40))
(newline)
(display ((acc `other-pwasword `deposit) 50))
(exit)